
#ifndef _MESH
#define _MESH


#include "node.h"
#include "element.h"
#include "region.h"
#include <map>
#include <vector>
using namespace std;

class Mesh
{
public:
  Node* createNode( double _x, double _y );
  Element* createElement( vector<int> _connect );
  void addRegion( Region* _region );
  int getNodeId( double _x, double _y );
  map<int,vector<double> > getNodes();
  map<int,vector<int> >    getElems();
  vector<Region*> getRegions();
protected:
private:
  vector<Node*>    m_nodes;
  vector<Element*> m_elems;
  vector<Region*>  m_regions;
};


#endif
